<template>
  <div class="container">
    <div class="container-head flex_btw">
      <div class="head-title flex_x">
        <img class="head-icon" src="@/assets/images/data.png" alt="" />
        <span>预警配置</span>
      </div>
    </div>
    <div class="container-main">
      <el-form :model="formList" label-width="auto" size="large">
        <el-form-item label="名称：">
          <el-col :span="10">
            <el-input v-model="formList.name" placeholder="请输入预警名称" />
          </el-col>
        </el-form-item>
        <el-form-item label="指标：">
          <el-col :span="4">
            <el-select
              v-model="formList.target"
              placeholder="please select your zone"
            >
              <el-option label="销售单数" value="销售单数" />
              <el-option label="Zone two" value="beijing" />
            </el-select>
          </el-col>
        </el-form-item>
        <el-form-item label="维度：">
          <div class="flex1">
            <el-row>
              <el-col :span="4" class="mr30">
                <el-select
                  v-model="formList.range"
                  placeholder="please select your zone"
                >
                  <el-option label="店铺" value="店铺" />
                  <el-option label="全部" value="全部" />
                </el-select>
              </el-col>
              <el-col :span="4">
                <el-select
                  v-model="formList.store"
                  placeholder="please select your zone"
                >
                  <el-option label="全部" value="" />
                  <el-option label="店铺A" value="店铺A" />
                  <el-option label="店铺B" value="店铺B" />
                </el-select>
              </el-col>
              <el-col :span="4" class="ml30">
                <el-button type="danger" :icon="Minus" circle size="small" />
              </el-col>
            </el-row>
            <el-row class="mt10">
              <el-col :span="4" class="mr30">
                <el-select
                  v-model="formList.range"
                  placeholder="please select your zone"
                >
                  <el-option label="品牌" value="店铺" />
                  <el-option label="全部" value="全部" />
                </el-select>
              </el-col>
              <el-col :span="4">
                <el-select
                  v-model="formList.store"
                  placeholder="please select your zone"
                >
                  <el-option label="A品牌" value="" />
                  <el-option label="店铺A" value="店铺A" />
                  <el-option label="店铺B" value="店铺B" />
                </el-select>
              </el-col>
              <el-col :span="4" class="ml30">
                <el-button type="primary" :icon="Plus" circle size="small" />
                <el-button type="danger" :icon="Minus" circle size="small" />
              </el-col>
            </el-row>
          </div>
        </el-form-item>
        <el-form-item label="条件：">
          <el-col :span="4" class="mr30">
            <el-select
              v-model="formList.limit"
              placeholder="please select your zone"
            >
              <el-option label="指标值" value="" />
              <el-option label="Zone two" value="beijing" />
            </el-select>
          </el-col>
          <el-col :span="4" class="mr30">
            <el-select
              v-model="formList.limit"
              placeholder="please select your zone"
            >
              <el-option label="等于" value="" />
              <el-option label="Zone two" value="beijing" />
            </el-select>
          </el-col>
          <el-col :span="2" class="mr10">
            <el-input
              v-model="formList.limitNum"
              class="num_ipt"
              placeholder="Please input"
            />
          </el-col>
          <el-col :span="2" class="mr30">
            <el-select
              v-model="formList.limit"
              placeholder="please select your zone"
            >
              <el-option label="And" value="" />
              <el-option label="Zone two" value="beijing" />
            </el-select>
          </el-col>
          <div>单位：单</div>
          <el-col :span="4" class="ml30">
            <el-button type="primary" :icon="Plus" circle size="small" />
            <el-button type="danger" :icon="Minus" circle size="small" />
          </el-col>
        </el-form-item>
        <!-- <el-form-item label="通知对象">
          <el-checkbox-group v-model="formList.type">
            <el-checkbox value="Online activities" name="type">
              决策层
            </el-checkbox>
            <el-checkbox value="Promotion activities" name="type">
              管理层
            </el-checkbox>
            <el-checkbox value="Offline activities" name="type">
              店长
            </el-checkbox>
            <el-checkbox value="Simple brand exposure" name="type">
              店员
            </el-checkbox>
          </el-checkbox-group>
        </el-form-item> -->
        <el-form-item label="周期：">
          <el-input
            v-model="formList.limitNum"
            class="num_ipt"
            placeholder="Please input"
          />
          <el-col :span="2" class="mr30">
            <el-select
              v-model="formList.date"
              placeholder="please select your zone"
            >
              <el-option label="日" value="" />
              <el-option label="Zone two" value="beijing" />
            </el-select>
          </el-col>
        </el-form-item>
        <el-form-item label="严重程度：">
          <el-radio-group v-model="formList.warn">
            <el-radio value="">严重</el-radio>
            <el-radio value="Venue">警告</el-radio>
          </el-radio-group>
        </el-form-item>

        <el-form-item label="直接生成任务：">
          <el-radio-group v-model="formList.date">
            <el-radio value="">
              是
              <el-input v-model="formList.limitNum" class="num_ipt"> </el-input>
              次预警后
            </el-radio>
            <el-radio value="Venue">否</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item>
          <div class="ml40 mr10">第一级：</div>
          <el-col :span="4" class="mr30">
            <el-select
              v-model="formList.bm"
              placeholder="please select your zone"
            >
              <el-option label="部门" value="" />
              <el-option label="Zone two" value="beijing" />
            </el-select>
          </el-col>
          <el-col :span="4" class="mr30">
            <el-select
              v-model="formList.zw"
              placeholder="please select your zone"
            >
              <el-option label="职务" value="" />
              <el-option label="Zone two" value="beijing" />
            </el-select>
          </el-col>
          <el-col :span="4">
            <el-select
              v-model="formList.yg"
              placeholder="please select your zone"
            >
              <el-option label="指定员工" value="" />
              <el-option label="Zone two" value="beijing" />
            </el-select>
          </el-col>
          <el-col :span="4" class="ml30">
            <el-button type="primary" :icon="Plus" circle size="small" />
            <!-- <el-button type="danger" :icon="Minus" circle size="small" /> -->
          </el-col>
        </el-form-item>
        <el-form-item label="提醒：">
          <div class="cf5">临期：</div>
          <el-input
            v-model="formList.limitNum"
            class="num_ipt"
            placeholder="Please input"
          />
          <el-col :span="2" class="mr30">
            <el-select
              v-model="formList.date"
              placeholder="please select your zone"
            >
              <el-option label="日" value="" />
              <el-option label="Zone two" value="beijing" />
            </el-select>
          </el-col>
          <div class="cf5">超期：</div>
          <el-input
            v-model="formList.limitNum"
            class="num_ipt"
            placeholder="Please input"
          />
          <el-col :span="2" class="mr30">
            <el-select
              v-model="formList.date"
              placeholder="please select your zone"
            >
              <el-option label="日" value="" />
              <el-option label="Zone two" value="beijing" />
            </el-select>
          </el-col>
        </el-form-item>

        <el-form-item label="预警内容：">
          <el-col :span="18">
            <el-input v-model="formList.con" type="textarea" :rows="3" />
          </el-col>
        </el-form-item>
      </el-form>
      <div class="flex_c">
        <el-button size="large" @click="router.back()">取消</el-button>
        <el-button size="large" type="primary" @click="onSubmit"
          >保存</el-button
        >
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { Search } from "@element-plus/icons-vue";
import { useRouter } from "vue-router";
import { Plus, Minus } from "@element-plus/icons-vue";
const router = useRouter();
const params = ref("");
const formList = reactive({
  name: "A品牌2天不开单店铺预警",
  target: "销售单数",
  range: "店铺",
  store: "",
  limit: "",
  limitNum: "2",
  date: "",
  warn: "",
  con: "A品牌的【店铺】已经2天没有开单，如下是店铺这两天的相关指标数据：【进店数】，【进店数环比】【试衣率】，【试衣率环比】建议动作：暂无",
  bm: "",
  zw: "",
  yg: "",
});
const onSubmit = () => {
  console.log("submit!");
};
</script>
<style lang="scss" scoped></style>
